<script>
import global from "@/config/global";

export default {
  globalData: {
    targetPlatform: global.targetPlatform,
  },
};
</script>
<script setup>
import {
  onLaunch,
  onShow,
  onReady,
  onHide,
  onUnload,
  onPageNotFound,
} from "@dcloudio/uni-app";
import { getUserResource } from "@/services/sys";
import {
  useResetCurPageInfoOnToggleWindowTab,
  useHackFixedPcAdminRefreshOnUnload,
} from "@uni_modules/gd-accbuild-core/pages/hooks/hackFixedPcAdminRefreshPage";
import { hackFixPageNotFound } from "@uni_modules/gd-accbuild-core/pages/hooks/hackFixPageNotFound";
import { getCurrentInstance } from "vue";
import { useStore } from "vuex";
const _store = useStore();
// #ifdef H5
useResetCurPageInfoOnToggleWindowTab(_store);
useHackFixedPcAdminRefreshOnUnload(_store);
// #endif

//const curInstance = getCurrentInstance();
onLaunch(() => {
	
	  console.log(uni.getSystemInfoSync().platform,'当前平台')
  getUserResource().then((res) => {
	  console.log(res,'获取后盾资源')
    _store.dispatch("permission/generateRoutes", res).then(
      (generateRes) => {},
      (error) => {
        console.log(error);
      }
    );
  });
});
onPageNotFound(() => {
  new global.GD_Log({ flag: "页面没找到111" }).println(
    _store.state.permission.curPageInfo
  );
  hackFixPageNotFound({
    store:_store,
    curPageInfo: _store.state.permission.curPageInfo,
    isJumpFromAddrInput: true,
  });
});
</script>

<style lang="scss">
#app {
  overflow: hidden;
}
page {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.uni-app--showleftwindow + .uni-tabbar-bottom {
  display: none;
}

uni-page-body {
  background-color: #{$--accbuild-default-container-background-color};
  max-height: 100% !important;
}

uni-page-wrapper {
  height: 100% !important;
}

uni-page-wrapper::after,
uni-top-window--placeholder {
  display: none !important;
}

/* .uni-app--showtopwindow [data-page="pages/gd-accbuild-development-mgr/project-mgr/index"] {
	//display: none;
} */
</style>
